$(document).ready(function(){
    //Global vars
    var form = $("#customForm");
    var university = $("#university");
    var universityinfo = $("#universityinfo");
    var fieldofstudy = $("#fieldofstudy");
    var fieldofstudyinfo = $("#fieldofstudyinfo");
    var specialization = $("#specialization");
    var specializationinfo = $("#specializationinfo");
    var pointsreq = $("#pointsreq");
    var pointsreqinfo = $("#pointsreqinfo");
    var pointsattained = $("#pointsattained");
    var pointsattainedinfo = $("#pointsattainedinfo");
    var yearreq = $("#yearreq");
    var yearreqinfo = $("#yearreqinfo");
    //On blur
    university.onblur(university);
    fieldofstudy.onblur(fieldofstudy);
    specialization.onblur(specialization);
    pointsreq.onblur(pointsreq);
    pointsattained.onblur(pointsattained);
    yearreq.onblur(yearreq);
    //On key press
    university.keyup(university);
    fieldofstudy.keyup(fieldofstudy);
    specialization.keyup(specialization);
    pointsreq.keyup(pointsreq);
    pointsattained.keyup(pointsattained);
    yearreq.keyup(yearreq);
    //On Submitting
    form.submit(function(){
        if(true)
            return true;
        else
            return false;
    });
    //Validation functions
    function validateuniversity(){
        //if it's NOT valid
        if(university.options[university.selectedIndex] != 0) {
            university.addClass("error");
            universityinfo.text("You have to pick a university!");
            universityinfo.addClass("error");
        }
        //if it's valid
        else{
            university.removeClass("error");
            universityinfo.text("Pick your university.");
            universityinfo.removeClass("error");
        }
    }
});